
snippet class "class .. (class)"
class ${1:`!p snip.rv = snip.basename or "name"`} {
public:
	${1/(\w+).*/$1/}(${2:arguments});
	virtual ~${1/(\w+).*/$1/}();

private:
	${0:/* data */}
};
endsnippet

snippet map "std::map (map)"
std::map<${1:key}, ${2:value}> ${3:temp};
endsnippet

snippet vec "std::vector (v)"
std::vector<${1:char}> ${3:temp};
endsnippet

snippet mfun "member func"
${1:void} ${2:`!p snip.rv = snip.basename`}::${3:Func}($4) {
	$0
}
endsnippet

snippet ffun "free func"
${1:void} ${2:Func}($3) {
	$0
}
endsnippet

snippet hfun "header func"
${1:void} ${3:Func}($4);
endsnippet

snippet nsp "namespace .. (namespace)" !
namespace${1/.+/ /m}${1:`!p snip.rv = snip.basename or "name"`} {
$0
}${1/.+/ \/\/ namespace /m}$1
endsnippet

snippet uns "unnamed namespace" !
namespace {
$0
}  // unnamed namespace
endsnippet

snippet fori "for int loop (fori)"
for ( ${4:int} ${2:i} = 0; $2 < ${1:count}; ${3:++$2} ) {
	${0:/* code */}
}
endsnippet

snippet ss "std::string" i
std::string $0
endsnippet

snippet cr "const type&" i
const ${1:type} &${2:var}
endsnippet

snippet cs "const string&" i
const std::string &$0
endsnippet

snippet sv "absl::string_view" i
absl::string_view $0
endsnippet

snippet so "util::StatusOr" i
util::StatusOr<$1> $2
endsnippet

snippet st "util::Status" i
util::Status $0
endsnippet

snippet ve "std::vector" i
std::vector<${1:std::string}> $2
endsnippet

snippet cv "const std::vector<>&" i
const std::vector<${1:std::string}> &$2
endsnippet

snippet ca "const auto&" i
const auto& $0
endsnippet

snippet sd "std::" i
std::
endsnippet
